package com.shawn.pgsql.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.shawn.pgsql.config.ArrayTypeHandler;
import com.shawn.pgsql.config.JsonTypeHandler;
import lombok.Data;

import java.util.List;

/**
 * @ author 飞天蝙蝠
 * @ date & time 2024/9/29 10:35
 */
@Data
@TableName("user_info")
public class User {

    @TableId(type = IdType.AUTO)  //
    private Long id;

    private String name;

    private String phone;

    @TableField(value = "metadata", typeHandler = JsonTypeHandler.class)
    private String metadata;

    @TableField(value = "interests", typeHandler = ArrayTypeHandler.class)
    private List<String> interests;
}
